#ifndef DATAGRABBER_H
#define DATAGRABBER_H

#include <QTimer>
#include <stdio.h>
#include <QString>
#include <QDebug>
#include <QFile>
#include "delib.h"
#include "conio.h"


#define COUNTOFCONNECTORS 14
#define COUNTOFREFERENCE 2
#define COUNTOFTEMPERATURE 1

#define NUMBEROFREFERENCE1 12
#define NUMBEROFREFERENCE2 13
#define NUMBEROFABSOLUTE 14
#define NUMBEROFTEMPERATURE 15

class DataGrabber : public QTimer
{
    Q_OBJECT
public:
    DataGrabber(ulong boxHandle);
    float getAVolt();
    void setNextConnectorNumber();
    ulong handle;

    int connectorNumber;
    int lastActiveConnector;
    int getLastActiveConnector();
    bool isConnectorActive[COUNTOFCONNECTORS];

    void connectorToggled(int number, bool checked);


public slots:
    void shot();


signals:
    void newVoltValue(int,float);
    void lastConnectorActive(int);
};

#endif // BIMOSBOXTIMEHANDLER_H
